package biz

import (
	"cyiris/app/demo/models"
	"cyiris/core/core"
)

type GetUserBiz struct {
}

func NewGetUserBiz() *GetUserBiz {
	return &GetUserBiz{}
}

func (biz *GetUserBiz) Handle() *models.TUser {
	db, err := core.GetMysqlDb("test")

	if nil != err {
		return nil
	}

	user := &models.TUser{}

	err = db.Last(user).Error

	if nil != err {
		return nil
	}

	return user
}
